package com.liufh.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;

import java.util.Arrays;

/**
 * @author: liufh
 * @create: 2021-09-16 14:26
 */
public class LogUtil {

    public void beforePrintLog(JoinPoint jp){
        Object[] args = jp.getArgs();
        System.out.println("前置通知：beforePrintLog，参数是：" + Arrays.toString(args));
    }

    public void afterReturningPrintLog(Object rtValue){
        System.out.println("后置通知：afterReturningPrintLog，返回值是：" + rtValue);
    }

    public void afterPrintLog(){
        System.out.println("最终通知：afterPrintLog");
    }

}
